/*
	Script: CMS Library (Client Side)
	Provides widgets for common CMS tasks.
	
	Author:
		Sean Micklethwaite
		
	Version:
		0.1 (Alvin)

	License:
		This file is part of the Dynamo CMS UI Toolkit
		Copyright (c) Dynamo Studios 2008
		
		*NOTE*
		
		Permission is hereby granted to execute this file as a
		web service under the terms of the license agreement.
		
		See LICENSE.txt, in the system folder.
		
		All other rights, other than those expressed in the license
		document, are reserved.

 */


/*
	Class: modManageContent
	Not yet documented.
	
	Extends:
		<UiManager>
*/
var modManageContent = UiManager.extend({
	
	initialize: function(oMgr) {
		this.parent(oMgr);
		this.rigButtons(this.form.getElements('button[value^=sec]'));
		
		this.liveTable.addEvent('onRowUpdate', function(row){
			this.rigButtons(row.dataRow.getElements('button[value^=sec]'));
		}.bind(this));
	},
	
	onUpdate: function(rq){
		data = {};
		if ($defined(rq.meta.objectId))
			data[0] = rq.meta.objectId;
		if ($defined(rq.meta.objectOwner))
			data[1] = rq.meta.objectOwner;
		if ($defined(rq.meta.objectSummary))
			data[2] = rq.meta.objectSummary;
		
		this.update(data);
	}
});
